<template>
	<!-- #ifdef MP-WEIXIN -->
	<button open-type="contact" show-message-card class="app-mp-contact-btn" :class="customClass" v-if="MPAPP_CONTACT">
		<slot></slot>
	</button>
	<view :class="customClass" @tap="handleTap" v-else>
		<slot></slot>
	</view>
	<!-- #endif -->
	<!-- #ifndef MP-WEIXIN -->
	<view :class="customClass" @tap="handleTap">
		<slot></slot>
	</view>
	<!-- #endif -->
	
</template>

<script setup lang="ts">
import { MPAPP_CONTACT } from '@/env';

const props = defineProps({
	customClass: String,
	contact:{
		type:Boolean,
		default:true
	} 
});
const emit = defineEmits(['tapContact']);
const handleTap = () => {
	emit('tapContact');
};
</script>

<style></style>
